﻿using System;

namespace Qimen.Api
{
    public class MyQimenClient : DefaultQimenClient
    {
        public MyQimenClient(string serverUrl, string appKey, string appSecret, bool useProxy)
            : base(serverUrl, appKey, appSecret)
        {
            if (topLogger is Top.Api.Log)
            {
                string logDir = AppDomain.CurrentDomain.BaseDirectory + "Logs\\";
                if (!System.IO.Directory.Exists(logDir))
                {
                    System.IO.Directory.CreateDirectory(logDir);
                }
                (topLogger as Top.Api.Log).LogDirectory = logDir;
            }
            webUtils.DisableWebProxy = !useProxy;
        }
    }
}
